clear all; close all; clc;
alpha=deg2rad(0:2:180);
betta=deg2rad(-90:2:90);
alpha_f=pi/2;
betta_f=pi/2;
[phi1_f,phi2_f,phi3_f,phi4_f]=dphi(alpha_f, betta_f);
betta_w=exp(-1i*[phi1_f;phi2_f;phi3_f;phi4_f]);
    
for a1=1:length(alpha);
    for b1=1:length(betta);
        
[phi1, phi2, phi3, phi4]=dphi(alpha(a1),betta(b1));

y=exp(1i*[phi1;phi2;phi3;phi4]); 

F(a1,b1)=betta_w.'*y;

 
    end
end
[alpha_m,betta_m]=meshgrid(alpha,betta);
[x,y,z]=sph2cart(betta_m,alpha_m,F);
surf(x,y,z);
